<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>百元买百鸡</title>
		<script>
		var index=1;
		for(var cock=0;cock<=20;cock++)
		{
			for(var hen=0;hen<=33;hen++)
			{
				if(cock+hen+(100-5*cock-3*hen)*3==100)
				{
					var chick=100-cock-hen;
					if(cock*5+hen*3+chick/3&&chick%3==0)
					{
						document.write("第"+index+"种方法："+"<br />");
						document.write("大公鸡的数量为："+cock+"只<br />");
						document.write("老母鸡的数量为："+hen+"只<br />");
						document.write("小鸡的数量为："+chick+"只<br />");
						document.write("<br />")
						index++;
					}
				}
			}
		}
		</script>
	</head>
	<body>
	</body>
</html>
